<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Huffman-homework: C:/Users/Admin/Desktop/issue/huffman-homework/Huffman.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="mm.bmp"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Huffman-homework
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_huffman_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Huffman.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h__dep__incl.png" border="0" usemap="#_c_1_2_users_2_admin_2_desktop_2issue_2huffman-homework_2_huffman_8hdep" alt=""/></div>
<map name="_c_1_2_users_2_admin_2_desktop_2issue_2huffman-homework_2_huffman_8hdep" id="_c_1_2_users_2_admin_2_desktop_2issue_2huffman-homework_2_huffman_8hdep">
</map>
</div>
</div>
<p><a href="_huffman_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_entry.html">Entry</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_code.html">Code</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae6da2ac39f271e327984f920396d4226"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#ae6da2ac39f271e327984f920396d4226">parse</a> (char *input)</td></tr>
<tr class="separator:ae6da2ac39f271e327984f920396d4226"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d514936fcd5754b4e16a701869ceba7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#a3d514936fcd5754b4e16a701869ceba7">getBit</a> (const void *input, unsigned int bit)</td></tr>
<tr class="separator:a3d514936fcd5754b4e16a701869ceba7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28631afd535a48b8305d60824efc7a80"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#a28631afd535a48b8305d60824efc7a80">setBit</a> (void *input, unsigned int bit, bool flag)</td></tr>
<tr class="separator:a28631afd535a48b8305d60824efc7a80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ea33aab4a85904900987a1e548f0d51"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#a8ea33aab4a85904900987a1e548f0d51">getFrequency</a> (<a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *array[256], const char *text)</td></tr>
<tr class="separator:a8ea33aab4a85904900987a1e548f0d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae29f1caca63c1d4c47fe74e911f5090f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#ae29f1caca63c1d4c47fe74e911f5090f">shrinkImaginaryEntrys</a> (<a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *array[256])</td></tr>
<tr class="separator:ae29f1caca63c1d4c47fe74e911f5090f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf17c7d0746b1093644b6e39073e566c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#acf17c7d0746b1093644b6e39073e566c">fillLetterMap</a> (std::map&lt; char, <a class="el" href="struct_code.html">Code</a> &gt; *map, <a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *tree, bool start, char base[4], int size, bool right)</td></tr>
<tr class="separator:acf17c7d0746b1093644b6e39073e566c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a6e1b4ccad9c9dc4bc226127b0e0ded"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#a9a6e1b4ccad9c9dc4bc226127b0e0ded">buildHuffmanTree</a> (const char *text)</td></tr>
<tr class="separator:a9a6e1b4ccad9c9dc4bc226127b0e0ded"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9865ee52ece530d7b3b103b0d549007"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#ad9865ee52ece530d7b3b103b0d549007">decode</a> (<a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *tree, const char *text, char *output, int limit)</td></tr>
<tr class="separator:ad9865ee52ece530d7b3b103b0d549007"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcb57a49a5b5a68e9e34c11c10f15aa9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#abcb57a49a5b5a68e9e34c11c10f15aa9">code</a> (<a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *tree, const char *text, char *output, int limit)</td></tr>
<tr class="separator:abcb57a49a5b5a68e9e34c11c10f15aa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae306b5fba7e8c23a8b6ab4902741d446"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#ae306b5fba7e8c23a8b6ab4902741d446">debugPrintTree</a> (<a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *node, char legacy[10], int size, bool right)</td></tr>
<tr class="separator:ae306b5fba7e8c23a8b6ab4902741d446"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97bd49ee3670e131477f66852fb5f565"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_huffman_8h.html#a97bd49ee3670e131477f66852fb5f565">getLowest</a> (int &amp;lowest, int &amp;preLowest, <a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *frequency[256], int size)</td></tr>
<tr class="separator:a97bd49ee3670e131477f66852fb5f565"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a9a6e1b4ccad9c9dc4bc226127b0e0ded"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; * buildHuffmanTree </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Node&lt;Entry&gt;* buildHuffmanTree (const char* text)</p>
<p>This function builds Huffman tree based on given text</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>char* text - text to build Huffman tree from</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Node&lt;Entry&gt;* - the root node of Huffman tree </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_cgraph.png" border="0" usemap="#_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_cgraph" alt=""/></div>
<map name="_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_cgraph" id="_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_cgraph">
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_icgraph.png" border="0" usemap="#_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_icgraph" alt=""/></div>
<map name="_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_icgraph" id="_huffman_8h_a9a6e1b4ccad9c9dc4bc226127b0e0ded_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="abcb57a49a5b5a68e9e34c11c10f15aa9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int code </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>limit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>int code (Node&lt;Entry&gt;* tree, const char* text, char* output, int limit)</p>
<p>This function compresses text</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Node&lt;Entry&gt;*</td><td>tree - the root node of Huffman tree </td></tr>
    <tr><td class="paramname">const</td><td>char* text - original text </td></tr>
    <tr><td class="paramname">char*</td><td>output - output buffer to write result in </td></tr>
    <tr><td class="paramname">int</td><td>limit - the maximal size of output buffer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>amount of bits that was written </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_cgraph.png" border="0" usemap="#_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_cgraph" alt=""/></div>
<map name="_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_cgraph" id="_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_cgraph">
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_icgraph.png" border="0" usemap="#_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_icgraph" alt=""/></div>
<map name="_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_icgraph" id="_huffman_8h_abcb57a49a5b5a68e9e34c11c10f15aa9_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae306b5fba7e8c23a8b6ab4902741d446"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void debugPrintTree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>legacy</em>[10], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>right</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>void debugPrintTree (Node&lt;Entry&gt;* node, char legacy[10], int size, bool right)</p>
<p>DEBUGGING FUNCTION </p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_ae306b5fba7e8c23a8b6ab4902741d446_cgraph.png" border="0" usemap="#_huffman_8h_ae306b5fba7e8c23a8b6ab4902741d446_cgraph" alt=""/></div>
<map name="_huffman_8h_ae306b5fba7e8c23a8b6ab4902741d446_cgraph" id="_huffman_8h_ae306b5fba7e8c23a8b6ab4902741d446_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ad9865ee52ece530d7b3b103b0d549007"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void decode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>limit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>void decode (Node&lt;Entry&gt;* tree, const char* text, char* output, int limit)</p>
<p>This function decodes compressed text</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Node&lt;Entry&gt;*</td><td>tree - Huffman tree </td></tr>
    <tr><td class="paramname">const</td><td>char* text - compressed text </td></tr>
    <tr><td class="paramname">char*</td><td>output - output buffer </td></tr>
    <tr><td class="paramname">int</td><td>limit - how many bits to decode </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_cgraph.png" border="0" usemap="#_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_cgraph" alt=""/></div>
<map name="_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_cgraph" id="_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_cgraph">
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_icgraph.png" border="0" usemap="#_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_icgraph" alt=""/></div>
<map name="_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_icgraph" id="_huffman_8h_ad9865ee52ece530d7b3b103b0d549007_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="acf17c7d0746b1093644b6e39073e566c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fillLetterMap </td>
          <td>(</td>
          <td class="paramtype">std::map&lt; char, <a class="el" href="struct_code.html">Code</a> &gt; *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td>
          <td class="paramname"><em>tree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>base</em>[4], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>right</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>void fillLetterMap (std::map&lt;char, Code&gt;* map, Node&lt;Entry&gt;* tree, bool start, char base[4], int size, bool right)</p>
<p>This function fills map with Codes to make access to codes faster. This functuion is recursive.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">std::map&lt;char,Code&gt;*</td><td>map - map to fill </td></tr>
    <tr><td class="paramname">Node&lt;Entry&gt;*</td><td>tree - the root node of Huffman tree to get Codes from </td></tr>
    <tr><td class="paramname">bool</td><td>start - Is this the first call of this function. </td></tr>
    <tr><td class="paramname">char</td><td>base[4] - any array of 4 bytes </td></tr>
    <tr><td class="paramname">int</td><td>size - the iteration of recursion. When first called must be zero. </td></tr>
    <tr><td class="paramname">bool</td><td>right - is this function called for right leaf. When first call must be true </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_acf17c7d0746b1093644b6e39073e566c_cgraph.png" border="0" usemap="#_huffman_8h_acf17c7d0746b1093644b6e39073e566c_cgraph" alt=""/></div>
<map name="_huffman_8h_acf17c7d0746b1093644b6e39073e566c_cgraph" id="_huffman_8h_acf17c7d0746b1093644b6e39073e566c_cgraph">
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_acf17c7d0746b1093644b6e39073e566c_icgraph.png" border="0" usemap="#_huffman_8h_acf17c7d0746b1093644b6e39073e566c_icgraph" alt=""/></div>
<map name="_huffman_8h_acf17c7d0746b1093644b6e39073e566c_icgraph" id="_huffman_8h_acf17c7d0746b1093644b6e39073e566c_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a3d514936fcd5754b4e16a701869ceba7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool getBit </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>bit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>bool getBit (const void* input, unsigned int bit)</p>
<p>This function retreives bit from array</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>void* input - array with bytes </td></tr>
    <tr><td class="paramname">unsigned</td><td>int bit - indexo of a bit in array</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- state of the bit </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_a3d514936fcd5754b4e16a701869ceba7_icgraph.png" border="0" usemap="#_huffman_8h_a3d514936fcd5754b4e16a701869ceba7_icgraph" alt=""/></div>
<map name="_huffman_8h_a3d514936fcd5754b4e16a701869ceba7_icgraph" id="_huffman_8h_a3d514936fcd5754b4e16a701869ceba7_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a8ea33aab4a85904900987a1e548f0d51"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int getFrequency </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td>
          <td class="paramname"><em>array</em>[256], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>void getFrequency (Node&lt;Entry&gt;* array[256], const char* text)</p>
<p>This functions gets frequencies of every ascii code from the text and shrinks it so only non zero frequency letters last.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Node&lt;Entry&gt;*</td><td>array[256] - array with nodes that contain Entries to be filled with information </td></tr>
    <tr><td class="paramname">const</td><td>char* text - text to analyse</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- int number of non-zero frequent codes </dd></dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_cgraph.png" border="0" usemap="#_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_cgraph" alt=""/></div>
<map name="_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_cgraph" id="_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_cgraph">
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_icgraph.png" border="0" usemap="#_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_icgraph" alt=""/></div>
<map name="_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_icgraph" id="_huffman_8h_a8ea33aab4a85904900987a1e548f0d51_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a97bd49ee3670e131477f66852fb5f565"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void getLowest </td>
          <td>(</td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>lowest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>preLowest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td>
          <td class="paramname"><em>frequency</em>[256], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>void getLowest (int&amp; lowest, int preLowest&amp;, Node&lt;Entry&gt;* frequency[256])</p>
<p>This function finds lowest and preLowest letter by frequency.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">int&amp;</td><td>lowest - reference to a varible to put lowest frequency index </td></tr>
    <tr><td class="paramname">int&amp;</td><td>preLowest - ref to a varible to put preLowest frequency index </td></tr>
    <tr><td class="paramname">Node&lt;Entry&gt;*</td><td>frequency[256] - array with frequencies </td></tr>
    <tr><td class="paramname">int</td><td>size - amount of non zero frequent elements in array </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_a97bd49ee3670e131477f66852fb5f565_icgraph.png" border="0" usemap="#_huffman_8h_a97bd49ee3670e131477f66852fb5f565_icgraph" alt=""/></div>
<map name="_huffman_8h_a97bd49ee3670e131477f66852fb5f565_icgraph" id="_huffman_8h_a97bd49ee3670e131477f66852fb5f565_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae6da2ac39f271e327984f920396d4226"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int parse </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>input</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a28631afd535a48b8305d60824efc7a80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setBit </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>bit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>flag</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>void setBit (void* input, unsigned int bit, bool flag)</p>
<p>This function sets bit in array.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">void*</td><td>input - array </td></tr>
    <tr><td class="paramname">unsigned</td><td>int bit - indexo of the bit </td></tr>
    <tr><td class="paramname">bool</td><td>flag - state to set bit to. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_a28631afd535a48b8305d60824efc7a80_icgraph.png" border="0" usemap="#_huffman_8h_a28631afd535a48b8305d60824efc7a80_icgraph" alt=""/></div>
<map name="_huffman_8h_a28631afd535a48b8305d60824efc7a80_icgraph" id="_huffman_8h_a28631afd535a48b8305d60824efc7a80_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ae29f1caca63c1d4c47fe74e911f5090f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int shrinkImaginaryEntrys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_node.html">Node</a>&lt; <a class="el" href="struct_entry.html">Entry</a> &gt; *&#160;</td>
          <td class="paramname"><em>array</em>[256]</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>int shrinkImaginaryEntrys (Node&lt;Entry&gt;* array[256])</p>
<p>This function deletes ascii codes with zero frequency from array of nodes</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Node&lt;Entry&gt;*</td><td>array[256] - arrray with nodes</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>int - number of nodes left </dd></dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_huffman_8h_ae29f1caca63c1d4c47fe74e911f5090f_icgraph.png" border="0" usemap="#_huffman_8h_ae29f1caca63c1d4c47fe74e911f5090f_icgraph" alt=""/></div>
<map name="_huffman_8h_ae29f1caca63c1d4c47fe74e911f5090f_icgraph" id="_huffman_8h_ae29f1caca63c1d4c47fe74e911f5090f_icgraph">
</map>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d522931ffa1371640980b621734a4381.html">Users</a></li><li class="navelem"><a class="el" href="dir_31059516c74acec96613626ef7aefcf7.html">Admin</a></li><li class="navelem"><a class="el" href="dir_75bfd10c97e1a12326c67b95924ea7f1.html">Desktop</a></li><li class="navelem"><a class="el" href="dir_8b3ae1d7c0b3c0d135a7fe7cf034a6a1.html">issue</a></li><li class="navelem"><a class="el" href="dir_cffd1e001ee2a87eebf0bd2a849b668e.html">huffman-homework</a></li><li class="navelem"><a class="el" href="_huffman_8h.html">Huffman.h</a></li>
    <li class="footer">Generated on Sat Sep 6 2014 07:57:43 for Huffman-homework by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
</body>
</html>
